package com.core.cloundbusinessapi.system.login.dto;

import com.core.cloundbusinessapi.system.user.dto.CloudSystemUserDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author =====Lqj=====
 * @className CloudSystemLoginDTO
 * @description 用户登陆返回参数
 * @create 2024/11/16 14:20
 **/
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CloudSystemLoginDTO {
    /***
     * 用户ID
     */
    private Long id;

    /**
     * 用户令牌
     */
    private String token;

    /**
     * 令牌有效时间
     * 小时
     */
    private Integer tokenTime;

    /**
     * 上一次登陆时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

    private CloudSystemUserDTO cloudSystemUserDTO;

}
